<h2><?php _e($sectionnavtitle) ?></h2>

<div class="portletinfo">

<?php if ($info['parent'] == '-1'): ?>
	<ul>
	<?php foreach ($currentlevel as $i): ?>
		<?php if ($i['metaid'] == $info['metaid']): ?>
			<li><strong><?php _e($i['title']) ?></strong>
			<?php if (count($childlevel)): ?>
				<ul>
				<?php foreach ($childlevel as $j): ?>
					<li><a href="<?php echo Gene::makeLink(Gene::metaId($j['metaname'])) ?>"><?php _e($j['title']) ?></a></li>
				<?php endforeach; ?>
				</ul>
			<?php endif; ?>
		<?php else: ?>
			<li><a href="<?php echo Gene::makeLink(Gene::metaId($i['metaname'])) ?>"><?php _e($i['title']) ?></a></li>
		<?php endif; ?>
		</li>
	<?php endforeach; ?>
	</ul>
<?php else: ?>
	<ul><li>

	<?php foreach ($parentlevels as $i): ?>
		<?php if ($i['parent'] == "-1"): ?>
			<a href="<?php echo Gene::makeLink(Gene::metaId($i['metaname'])) ?>"><?php _e($i['title']) ?></a>
		<?php else: ?>
			<ul><li><a href="<?php echo Gene::makeLink(Gene::metaId($i['metaname'])) ?>"><?php _e($i['title']) ?></a>
		<?php endif; ?>
		
		<?php if ($i['metaid'] == $info['parent']): ?>
			<ul>
			<?php foreach ($currentlevel as $j): ?>
				<?php if ($j['metaid'] == $info['metaid']): ?>
					<li><strong><?php _e($j['title']) ?></strong>
					<?php if (count($childlevel)): ?>
						<ul>
						<?php foreach ($childlevel as $k): ?>
							<li><a href="<?php echo Gene::makeLink(Gene::metaId($k['metaname'])) ?>"><?php _e($k['title']) ?></a></li>
						<?php endforeach; ?>
						</ul>
					<?php endif; ?>
				<?php else: ?>
					<li><a href="<?php echo Gene::makeLink(Gene::metaId($j['metaname'])) ?>"><?php _e($j['title']) ?></a>
				<?php endif; ?>
				</li>
			<?php endforeach; ?>
			</ul>
		<?php endif; ?>
		
		<?php $levels++; ?>
	<?php endforeach; ?>
	
	<?php echo str_repeat('</li></ul>', $levels) ?>
<?php endif; ?>

</div>